﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Summary.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="School_CourseDetail_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="DetailHeaderContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="DetailBodyContent" runat="Server">
    <div>
        <h2>
            Course Listing of
            <asp:Label runat="server" ID="lblCompany" Font-Size="Large" Font-Bold="true" />
        </h2>
        <br />
        <asp:HyperLink runat="server" ID="hplNewCourseDetail" Text="New Course Detail" NavigateUrl="~/School/CourseDetail/CreateEdit.aspx" />
        <br />
        <br />
        <div>
            
            <asp:HiddenField ID="hidCompanyId" runat="server" Value="-1" />
            <asp:Label ID="lblMessage" Font-Bold="true" ForeColor="Red" runat="server" Text=""></asp:Label>
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                AutoGenerateColumns="False" CellPadding="4" DataSourceID="sqlDSCourseList" ForeColor="#333333"
                GridLines="None" DataKeyNames="Id">
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                <Columns>
                    <asp:HyperLinkField DataNavigateUrlFields="Id" DataNavigateUrlFormatString="CreateEdit.aspx?id={0}"
                        Text="Edit" />
                    <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" InsertVisible="False"
                        ReadOnly="True" Visible="False" />
                    <asp:BoundField DataField="StandardLevelID" HeaderText="StandardLevelID" 
                        SortExpression="StandardLevelID" Visible="False" />
                    <asp:BoundField DataField="MajorFieldID" HeaderText="MajorFieldID" 
                        SortExpression="MajorFieldID" Visible="False" />
                    <asp:BoundField DataField="CourseID" HeaderText="CourseID" 
                        SortExpression="CourseID" Visible="False" />
                    <asp:BoundField DataField="CompanyId" HeaderText="CompanyId" 
                        SortExpression="CompanyId" Visible="False" />
                    <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                    <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" 
                        SortExpression="CompanyName" Visible="False" />
                    <asp:BoundField DataField="CourseName" HeaderText="Course" 
                        SortExpression="CourseName" />
                    <asp:BoundField DataField="Description" HeaderText="Description" 
                        SortExpression="Description" />
                    <asp:CheckBoxField DataField="IsActive" HeaderText="IsActive" SortExpression="IsActive" />
                    <asp:BoundField DataField="CreatedDate" HeaderText="CreatedDate" 
                        SortExpression="CreatedDate" Visible="False" />
                    <asp:BoundField DataField="ModifiedDate" HeaderText="ModifiedDate" 
                        SortExpression="ModifiedDate" />
                </Columns>
                <EditRowStyle BackColor="#999999" />
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
            </asp:GridView>
            <asp:SqlDataSource ID="sqlDSCourseList" runat="server" ConnectionString="<%$ ConnectionStrings:DB2ConnectionString %>"
                SelectCommand="usp_CourseDetailSelectItemList" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:ControlParameter ControlID="hidCompanyId" Name="CompanyId" PropertyName="Value"
                        Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
        </div>
    </div>
</asp:Content>
